import { link } from 'fs'
import { defineConfig } from 'vitepress'

// https://vitepress.dev/reference/site-config
export default defineConfig({
  title: "Orange UI",
  themeConfig: {
    logo: "/orange.svg",
    // https://vitepress.dev/reference/default-theme-config
    nav: [
      { text: '指南', link: '/guide/' },
      { text: '组件', link: '/components/' }
    ],

    sidebar: {
      '/guide/': [
        {
          text: '指南',
          items: [
            { text: '安装', link: '/guide/' },
          ]
        }
      ],
      '/components/': [
        {
          text: '组件',
          items: [
            { text: '全部组件', link: '/components/' },
            { text: 'icon', link: '/components/icon' },
            { text: 'button', link: '/components/button' },
            { text: "alert", link: "/components/alert" },
            { text: "alertDialog", link: "/components/alertDialog" },
            { text: "accordion", link: "/components/accordion" },
            { 
              text: "tree", 
              link: "/components/tree/base",
              // collapsed: true,
              items: [
                { text: "基础使用", link: "/components/tree/base" },
                { text: "自定义数据格式", link: "/components/tree/custom"},
                { text: "异步加载", link: "/components/tree/async"},
                { text: "单选", link: "/components/tree/select"},
                { text: "多选", link: "/components/tree/mutiple"},
                { text: "级联选择", link: "/components/tree/cascade"},
                { text: "自定义节点内容", link: "/components/tree/customNode"},
                { text: "虚拟滚动", link: "/components/tree/virtual"},
                { text: "属性", link: "/components/tree/props"}
              ]
            },
            { 
              text: "input", 
              link: "/components/input/base",
              items: [
                { text: "基础使用", link: "/components/input/base" },
                { text: "尺寸", link: "/components/input/size"},
                { text: "提示", link: "/components/input/placeholder"},
                { text: "禁用", link: "/components/input/disabled"},
                { text: "只读", link: "/components/input/readonly"},
                { text: "自动聚焦", link: "/components/input/autofocus"},
                { text: "显示密码", link: "/components/input/showPassword"},
                { text: "清除", link: "/components/input/clearable"},
                { text: "前缀", link: "/components/input/prefix"},
                { text: "后缀", link: "/components/input/suffix"},
                { text: "表单", link: "/components/input/form"},
                { text: "属性", link: "/components/input/props"},
              ] 
            },
            {
              text: "checkbox", 
              link: "/components/checkbox/base",
              items: [
                { text: "基础使用", link: "/components/checkbox/base" },
                { text: "绑定值", link: "/components/checkbox/value" },
                { text: "表单", link: "/components/checkbox/form"},
                { text: "禁用", link: "/components/checkbox/disabled"},
              ]
            }
          ]
        }
      ]
      // {
      //   text: '开始使用',
      //   items: [
      //     { text: '安装', link: '/base/' },
      //   ]
      // },
    },

    socialLinks: [
      { icon: 'github', link: 'https://github.com/vuejs/vitepress' }
    ]
  }
})
